package com.dt.dubai.mall.entity;

import com.dt.dubai.core.comm.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.*;

import javax.persistence.Table;
import javax.validation.constraints.*;


/*
 * 商品sku记录表
 */

@Data
@Table(name = "dt_mall_commodity_sku")
@EqualsAndHashCode(callSuper = false)
public class MallCommoditySkuEntity extends BaseEntity {

    //商品信息记录ID
    @NotNull(message = "retailCommodityRecordId参数不能为空")
    Long retailCommodityRecordId;

    //sku码
    @NotNull(message = "skuCode参数不能为空")
    Long skuCode;

    //价格
    @NotNull(message = "skuPrice参数不能为空")
    Long skuPrice;

    //库存
    @NotNull(message = "skuStock参数不能为空")
    Long skuStock;

    //商品销售属性
    @Length(min = 0, max = 1000, message = "commodityInfoJson参数最大长度不1000")
    String commodityInfoJson;


}
